package com.pn.mapper;

import com.pn.entity.ProductType;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ProductTypeMapper {

    //根据分类编码或分类别名查询商品分类
    ProductType findTypeByCodeOrName(ProductType productType);

    //添加商品分类
    @Insert("insert into product_type values (null,#{parentId},#{typeCode}," +
            "#{typeName},#{typeDesc})")
    int insertProductType(ProductType productType);
}
